```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Java内存操作流详解 | 技术小馆</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        h1, h2, h3, h4 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
        }
        .hero {
            background: linear-gradient(135deg, #6e8efb 0%, #4a6cf7 100%);
        }
        .code-block {
            background-color: #282c34;
            border-radius: 8px;
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        .method-card {
            transition: all 0.3s ease;
            border-left: 4px solid #4a6cf7;
        }
        .method-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        .table-container {
            overflow-x: auto;
        }
        table {
            min-width: 100%;
            border-collapse: separate;
            border-spacing: 0;
        }
        th {
            background-color: #f8fafc;
        }
        tr:hover td {
            background-color: #f8fafc;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero text-white py-20 px-4 md:px-0">
        <div class="container mx-auto max-w-6xl flex flex-col items-center text-center">
            <div class="w-20 h-20 bg-white rounded-full flex items-center justify-center mb-6 shadow-lg">
                <i class="fas fa-code text-3xl text-blue-600"></i>
            </div>
            <h1 class="text-4xl md:text-5xl font-bold mb-4">Java内存操作流详解</h1>
            <p class="text-xl md:text-2xl max-w-3xl opacity-90">高效处理临时数据的利器</p>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto max-w-6xl px-4 md:px-0 py-12">
        <!-- Introduction -->
        <section class="mb-16">
            <div class="bg-white rounded-xl shadow-md p-8">
                <h2 class="text-2xl font-bold mb-4 text-gray-800 flex items-center">
                    <i class="fas fa-lightbulb text-yellow-500 mr-3"></i>
                    内存操作流概述
                </h2>
                <p class="text-gray-700 mb-4">内存操作流是Java中一种特殊的I/O流，它直接在内存中创建缓冲区，将数据临时保存在内存中而不是物理文件中。</p>
                <p class="text-gray-700">内存操作流一般用于生成临时文件时使用。如果将这些临时信息保存在文件中，则代码执行完后还需要删除这个临时文件会比较麻烦，这时使用内存操作流最为合适。</p>
            </div>
        </section>

        <!-- ByteArrayInputStream -->
        <section class="mb-16">
            <div class="bg-white rounded-xl shadow-md overflow-hidden">
                <div class="bg-gradient-to-r from-blue-50 to-indigo-50 p-6">
                    <h2 class="text-2xl font-bold text-gray-800 flex items-center">
                        <i class="fas fa-stream text-blue-600 mr-3"></i>
                        ByteArrayInputStream
                    </h2>
                    <p class="text-gray-700 mt-2">用于从内存中的字节数组读取数据的输入流</p>
                </div>
                
                <div class="p-6">
                    <h3 class="text-xl font-semibold mb-4 text-gray-800">主要方法</h3>
                    
                    <div class="table-container mb-8">
                        <table class="w-full">
                            <thead>
                                <tr class="text-left">
                                    <th class="py-3 px-4 rounded-tl-lg">序号</th>
                                    <th class="py-3 px-4">方法</th>
                                    <th class="py-3 px-4">类型</th>
                                    <th class="py-3 px-4 rounded-tr-lg">描述</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr class="border-b border-gray-100 hover:bg-gray-50">
                                    <td class="py-3 px-4">1</td>
                                    <td class="py-3 px-4 font-mono text-blue-600">public ByteArrayInputStream(byte[] buf)</td>
                                    <td class="py-3 px-4">构造</td>
                                    <td class="py-3 px-4">将全部内容写入内存中</td>
                                </tr>
                                <tr class="border-b border-gray-100 hover:bg-gray-50">
                                    <td class="py-3 px-4">2</td>
                                    <td class="py-3 px-4 font-mono text-blue-600">public ByteArrayInputStream(byte[] buf, int offset, int length)</td>
                                    <td class="py-3 px-4">构造</td>
                                    <td class="py-3 px-4">将指定范围的内容写入到内存中</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </section>

        <!-- ByteArrayOutputStream -->
        <section class="mb-16">
            <div class="bg-white rounded-xl shadow-md overflow-hidden">
                <div class="bg-gradient-to-r from-green-50 to-teal-50 p-6">
                    <h2 class="text-2xl font-bold text-gray-800 flex items-center">
                        <i class="fas fa-file-export text-green-600 mr-3"></i>
                        ByteArrayOutputStream
                    </h2>
                    <p class="text-gray-700 mt-2">用于向内存中的字节数组写入数据的输出流</p>
                </div>
                
                <div class="p-6">
                    <h3 class="text-xl font-semibold mb-4 text-gray-800">主要方法</h3>
                    
                    <div class="table-container mb-8">
                        <table class="w-full">
                            <thead>
                                <tr class="text-left">
                                    <th class="py-3 px-4 rounded-tl-lg">序号</th>
                                    <th class="py-3 px-4">方法</th>
                                    <th class="py-3 px-4">类型</th>
                                    <th class="py-3 px-4 rounded-tr-lg">描述</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr class="border-b border-gray-100 hover:bg-gray-50">
                                    <td class="py-3 px-4">1</td>
                                    <td class="py-3 px-4 font-mono text-blue-600">public ByteArrayOutputStream()</td>
                                    <td class="py-3 px-4">构造</td>
                                    <td class="py-3 px-4">创建对象</td>
                                </tr>
                                <tr class="border-b border-gray-100 hover:bg-gray-50">
                                    <td class="py-3 px-4">2</td>
                                    <td class="py-3 px-4 font-mono text-blue-600">public write(int b)</td>
                                    <td class="py-3 px-4">构造</td>
                                    <td class="py-3 px-4">将内容从内存中输出</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </section>

        <!-- Example Code -->
        <section class="mb-16">
            <div class="bg-white rounded-xl shadow-md overflow-hidden">
                <div class="bg-gradient-to-r from-purple-50 to-indigo-50 p-6">
                    <h2 class="text-2xl font-bold text-gray-800 flex items-center">
                        <i class="fas fa-laptop-code text-purple-600 mr-3"></i>
                        示例代码
                    </h2>
                    <p class="text-gray-700 mt-2">内存操作流的典型使用场景</p>
                </div>
                
                <div class="p-6">
                    <div class="code-block text-gray-200 p-6 mb-6">
                        <pre><code class="language-java">public class Test01 {
    public static void main(String[] args) throws Exception {
        String str = "hello World";
        
        ByteArrayInputStream bis = new ByteArrayInputStream(str.getBytes()); // 从内存中读取数据
        ByteArrayOutputStream bos = new ByteArrayOutputStream();  // 写到内存中
        
        byte[] by = new byte[1024];
        int read = bis.read(by, 0, by.length); // 读到一个数组里
        bos.write(by, 0, read); // 把数组写到内存中去
        System.out.println(bos.toString());  // 取出内存中的内容
    }
}</code></pre>
                    </div>
                    
                    <div class="bg-yellow-50 border-l-4 border-yellow-400 p-4">
                        <div class="flex">
                            <div class="flex-shrink-0">
                                <i class="fas fa-exclamation-circle text-yellow-500 mt-1"></i>
                            </div>
                            <div class="ml-3">
                                <p class="text-sm text-yellow-700">
                                    内存操作流一般在生成一些临时文件时才会使用。如果将这些临时信息保存在文件中，则代码执行完后肯定还要删除这个临时文件会比较麻烦，这是使用内存操作流最合适。
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Visualization -->
        <section class="mb-16">
            <div class="bg-white rounded-xl shadow-md p-8">
                <h2 class="text-2xl font-bold mb-6 text-gray-800 flex items-center">
                    <i class="fas fa-project-diagram text-indigo-600 mr-3"></i>
                    内存操作流工作原理
                </h2>
                
                <div class="mermaid">
                    graph TD
                        A[输入数据] --> B(ByteArrayInputStream)
                        B --> C[内存缓冲区]
                        C --> D(ByteArrayOutputStream)
                        D --> E[输出数据]
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-white py-8">
        <div class="container mx-auto max-w-6xl px-4 md:px-0">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-4 md:mb-0">
                    <h3 class="text-xl font-bold">技术小馆</h3>
                </div>
                <div>
                    <a href="http://www.yuque.com/jtostring" class="text-gray-400 hover:text-white transition-colors duration-300">
                        <i class="fas fa-globe mr-2"></i> http://www.yuque.com/jtostring
                    </a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```